<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="static/vue-2.5.16.js"></script>
</head>
<body>
<div id="app">
    <v2></v2>
</div>
<div id="app2">

</div>
</body>
</html>

<script>
    var v2 = {
        template: '<h1>vue局部组件</h1>'
    };
    var app = new Vue({
        el: '#app',
        components: {
            v2,
        }
    });

    var app2=new Vue({
        el:'#app2'
    });
</script>